﻿using System.Linq;
using System.Collections.Generic;
using INHollandair.Core.Models;
using INHollandair.Core.Repositories;

namespace INHollandair.Core.Services
{
    public class EventLogService
    {
        private readonly EventLogRepository _repo = new EventLogRepository();

        public EventLog GetEventLogById(int id)
        {
            return _repo.EventLogRepo.FirstOrDefault(x => x.Id.Equals(id));
        }
        public List<EventLog> GetAllEventLogs()
        {
            return _repo.EventLogRepo.ToList();
        }

        public void InsertEventLog(EventLog eventLog)
        {
            _repo.InsertEventLog(eventLog);
        }
        public void UpdateEventLog(EventLog eventLog)
        {
            _repo.UpdateEventLog(eventLog);
        }
        public void RemoveEventLog(EventLog eventLog)
        {
            _repo.RemoveEventLog(eventLog);
        }
    }
}
